﻿using UnityEngine;
using Zenject;

namespace DiIoc.Factory
{
    public class InstantiatePrefabInstaller : MonoInstaller
    {
        public GameObject EnemyPrefab;

        public override void InstallBindings()
        {
            Container.BindInterfacesTo<EnemySpawner>().AsSingle();
            Container.Bind<EnemyManager>().AsSingle();
            Container.BindFactory<Enemy, Enemy.Factory>().FromComponentInNewPrefab(EnemyPrefab);
        }
    }
}

